<%@page contentType="text/html; charset=UTF-8"%>
<%@taglib uri="/WEB-INF/struts-tags.tld" prefix="s"%>
<%@taglib uri="/WEB-INF/dianning.tld" prefix="dianning"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link href="/css/top.css" rel="stylesheet" type="text/css" />
<link href="/css/foot.css" rel="stylesheet" type="text/css" />
<link href="/css/index.css" rel="stylesheet" type="text/css" />
<link href="/css/vip.css" rel="stylesheet" type="text/css" />
<link href="/css/avatar.css" rel="stylesheet" type="text/css" />
<link href="/css/validator.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" charset="utf-8" src="/js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" charset="utf-8" src="/js/jquery_last.js"></script>
<script type="text/javascript" charset="utf-8" src="/js/formValidator.js"></script>
<script type="text/javascript" charset="utf-8" src="/js/formValidatorRegex.js"></script>
<script type="text/javascript" charset="utf-8" src="/js/DateTimeMask.js"></script>
<script type="text/javascript" charset="utf-8" src="/js/avatar.js"></script>
<script type="text/javascript" charset="utf-8" src="/js/popup.js"></script>
<link rel="shortcut icon" href="favicon.ico">
<link rel="icon" type="images/gif" href="animated_favicon1.gif" />
<title>点宁网[<dianning:webinfo type="area"/>分类信息]<dianning:webinfo type="area"/>免费发布信息<dianning:webinfo type="poweredby"/></title>
<meta name="Description" content="<dianning:webinfo type="area"/>分类信息网为您提供<dianning:webinfo type="area"/>分类信息，您可以免费发布和查询求职招聘,兼职,房屋出租,二手市场,生活服务,兼职,黄页等分类信息."/>
<meta name="Keywords" content="<dianning:webinfo type="area"/>免费发布信息, <dianning:webinfo type="area"/>分类信息, <dianning:webinfo type="area"/>信息港, <dianning:webinfo type="area"/>热线, <dianning:webinfo type="area"/>免费发布广告，<dianning:webinfo type="area"/>114"/>
</head>
<body>
<div class="bgtop">
<s:include value="/top.jsp" />
</div>
<div class="content">
<s:include value="/WEB-INF/jsp/user/left.jsp" />
	<div class="vipr">
	  <h2>修改个人简历信息</h2>
	  <ul class="viprheight">
<form name="save" id="save" method="post" action="userInfo.action">
<s:hidden name="action" value="doresume"/>
<DIV class=s_title>修改资料</DIV>
<DIV class=c></DIV>
<TABLE  class="grpic mt20" border=0 cellSpacing=0 cellPadding=0>
  <TBODY>
  <TR>
    <TD width="20%" align=right><SPAN class=red>*</SPAN> 姓 &nbsp; &nbsp;名： </TD>
    <TD align=left><s:textfield name="name" id="name" size="20" /><span id="nameTip"></span></TD>
</TR>
  <TR>
    <TD align=right><SPAN class=red>*</SPAN> 手 &nbsp; &nbsp;机： </TD>
    <TD align=left><s:textfield name="mobile" id="mobile" size="20"/><span id="mobileTip"></span></TD>
</TR>
<TR>
    <TD align=right> 电子邮件： </TD>
    <TD align=left><s:textfield name="email" id="email" size="20"/> <span id="emailTip"></span></TD>
</TR>
<TR>
    <TD align=right><SPAN class=red>*</SPAN> 性 &nbsp; &nbsp;别： </TD>
    <TD align=left>
		<s:radio list="sexList" name="sex" listKey="key" listValue="value"></s:radio>
		 <span id="sexTip"></span>
	</TD>
 </TR>
 <TR>
    <TD align=right> 出生日期： </TD>
    <TD align=left>
    <s:select list="yearList" name="birthyear" id="birthyear" listKey="key" listValue="value" onchange="javascript:birthdayOnchange(this);"></s:select>
年
<s:select list="monthList" name="birthmonth" id="birthmonth" listKey="key" listValue="value" onchange="javascript:birthdayOnchange(this);onConstellation();"></s:select>
月
<s:select list="dayList" name="birthday" id="birthday" listKey="key" listValue="value" onchange="javascript:birthdayOnchange(this);onConstellation();"></s:select>
日

		 <span id="sexTip"></span>
	</TD>
 </TR>
 <TR>
    <TD align=right>学 &nbsp; &nbsp;历：</TD>
    <TD class=basetb align=left>
    <s:select list="edugradeList" name="edugrade" id="edugrade" listKey="key" listValue="value"></s:select>
	<span id="edugradeTip"></span></TD>
</TR>
<TR>
    <TD align=right>工作年限：</TD>
    <TD class=basetb align=left>
    <s:select list="workyearsList" name="workyears" id="workyears" listKey="key" listValue="value"></s:select>
	<span id="edugradeTip"></span></TD>
</TR>
<TR>
    <TD align=right><SPAN class=red>*</SPAN> 工作经验： </TD>
    <TD align=left>
    <s:textarea id="workExperience" name="workExperience" rows="9" cols="50"></s:textarea>
    <font id="workExperienceTip"></font></TD>
 </TR>
 <TR>
    <TD align=right><SPAN class=red>*</SPAN> 教育经历： </TD>
    <TD align=left><s:textarea id="studyExperience" name="studyExperience" rows="9" cols="50"></s:textarea><font id="studyExperienceTip"></font></TD>
 </TR>
  <TR>
    <TD>&nbsp; </TD>
    <TD colSpan=2 align=left><INPUT id=btnSubmit class=grsub value=完成修改 type=submit name=btnSubmit />    </TD></TR></TBODY></TABLE>
<DIV class=c></DIV></FORM>
  </ul>
      <h3></h3>

    </div>

    </div>
<div class="content">
<s:include value="/foot.jsp" />
</div>
<script type="text/javascript">        
$(document).ready(function(){ 
	$.formValidator.initConfig({formid:"save",errorfocus: true});
	$("#name").formValidator({onshow:"请输入真实姓名",onfocus: "2-4个字，只允许输入中文"}).regexValidator({ regexp: "^[\u4e00-\u9fa5]*$", onerror: "只能输入中文" }).regexValidator({ regexp: "^(.){2,4}$", onerror: "真实姓名就为2-4个字！" });
	$("#mobile").formValidator({onshow:"请输入手机号码",onfocus: "请输入手机号码"}).regexValidator({ regexp: "^(13[0-9]|14[0-9]|15[0-9]|18[0-9])\\d{8}$", onerror: "请输入正确手机号码,如:13802400240。" });
	$("#email").formValidator({onshow:"电子邮件可以为空",onfocus: "请输入电子邮件",'empty':true,onempty:"电子邮件可以为空"}).regexValidator({ regexp: "^\\w+([-+.]\\w+)*@[a-zA-Z0-9]{1}([-a-zA-Z0-9]{0,61}[a-zA-Z0-9]{1})?\\.[a-zA-Z0-9]+([.a-zA-Z0-9]+)*$", onerror: "请输入正确的邮件,如:myname@sina.com " });
	$(':radio[name="sex"]').formValidator({ tipid: "sexTip",onshow:"请选择性别",onfocus: "请选择性别" }).functionValidator({ fun: function(val, elem) { return $(':radio[name="sex"]:checked').length > 0; }, onerror: '请选择性别' });
	$("#workExperience").formValidator({onshow:"请填写工作经历",onfocus: "10~2000个字之间" }).regexValidator({ regexp: "^[\\s\\S]*$", onerror: "请填写工作经历" }).regexValidator({ regexp: "^[\\s\\S]{10,}$", onerror: "工作经历不足10个字" }).regexValidator({ regexp: "^([\\s\\S]){10,2000}$", onerror: "内容应在10~2000个字之间" });
	$("#studyExperience").formValidator({onshow:"请填写教育经历",onfocus: "10~2000个字之间" }).regexValidator({ regexp: "^[\\s\\S]*$", onerror: "请填写教育经历" }).regexValidator({ regexp: "^[\\s\\S]{10,}$", onerror: "教育经历不足10个字" }).regexValidator({ regexp: "^([\\s\\S]){10,2000}$", onerror: "内容应在10~2000个字之间" });
});

function getDays(year , month)
{
	var dayarr = new Array(31,28,31,30,31,30,31,31,30,31,30,31);

	if(month == 2)
	{
		if((year%4 == 0 && year%100 != 0) || year%400 == 0 || year < 1900)
			return 29;
		else
			return dayarr[month-1];
	}
	else
	{
		return dayarr[month-1];
	}
}

function birthdayOnchange(obj)
{
	var year = document.getElementById("birthyear").value;
	if(year == "year")
		return;
	else
		year = parseInt(year , 10);
	
	var month = document.getElementById("birthmonth").value;
	if(month == "month")
		return;
	else
		month = parseInt(month , 10);
	
	var day = document.getElementById("birthday").value;
	var wholeday = getDays(year , month);

	if(1)
	{
		var options = document.getElementById("birthday").options;
		for(var i=1 ; i<=wholeday ; i++)	
		{
			var j = i.toString();
			//j = j.length==1 ? "0" + j : j;
			options.length = i;
			options[i-1].value = j;
			options[i-1].text = j;
			if(day <= wholeday && i==day)
			{
				options[i-1].selected = true;
			}
		}
	}
}

</script>
</body>
</html>
